define(["app"], function(app) {
	
	var deps = ["$resource", "BaseService"];
	
	function resource($resource, BaseService) {		
		var postHeader = {
				"Content-Type" : "application/x-www-form-urlencoded;charset=utf-8"
		};
		
		return $resource(BaseService.restfulUrl + "webapp", {}, {
			login : {
				method : "POST",
				url : BaseService.restfulUrl + "login/adminLogin",
				headers : postHeader
			},
			logout : {
				method : "GET",
				url : BaseService.restfulUrl + "login/adminlogout"
			}
		});
	}
	
	resource.$inject = deps;
	app.lazy.factory("UserResource", resource);
});
